package cn.jingyinghui.testlambda;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class TestBufferedReaderClass {

    public static String processFile() throws IOException {
        try (BufferedReader br =
                     new BufferedReader(new FileReader("data.txt"))) {
            return br.readLine();
        }
    }

    public static String processFile(BufferedReaderProcessor<BufferedReader> bufferedReaderProcessor) throws IOException {
        BufferedReader bufferedReader =
                new BufferedReader(new FileReader("pom.xml"));
            return bufferedReaderProcessor.process(bufferedReader);
    }

    /*public static void processFile(BufferedReader bufferedReader,TestBufferedInterface<Apple> testBufferedInterface) throws IOException {
        testBufferedInterface.processFile(new Apple("green",80));
    }*/
}
